//
// Code
// --------------------------------------------------


// Inline code styles

.code,
code,
kbd,
pre,
samp {
  font-family: @font-family-monospace;
}


// Inline code

kbd,
code {
  padding: (2*@rem) (5*@rem);
  font-size: @font-size-small;
  color: #0d47a1;
  background-color: rgba(0,0,0,.05);
}


// Keyboard text

kbd {
  border: @border-width solid @border-color;
  border-radius: .1rem;
  border-bottom-width: .1rem;
  color: #666;
  font-weight: bold;
}


// Blocks of code

pre {
  display: block;
  font-size: @font-size-small;
  padding: @space-sm;
  border: (1*@rem) solid transparent;
  background-color: rgba(0,0,0,.05);
  word-break: normal;
  word-wrap: normal;
  max-width: 100%;
  overflow: auto;

  code {
    padding: 0;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
    border-radius: 0;
  }
}


// Google code prettify

.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .prettyprint .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }

.prettyprint {
  &.linenums {
    border: @border-width solid @border-color;
    padding: @space-sm/2 @space-sm @space-sm/2 0;
    .box-shadow(~"inset 2rem 0 0 #fbfbfc, inset 2.05rem 0 0 #ececf0");
    word-wrap: break-word;
    word-break: break-all;

    code {white-space: pre-wrap;}
  }

  ol.linenums {
    padding-left: 2.25rem;
    color: #bebec5;
    line-height: 1rem;
    text-shadow: 0 .05rem 0 #fff;
    margin-bottom: 0;
  }
}
